package com.kingwang.training.designpattern.interpreter;

import com.kingwang.training.designpattern.interpreter.bo.Context;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class InterpreterApplication implements ApplicationRunner {

    public static void main(String[] args) {
        SpringApplication.run(InterpreterApplication.class, args);
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        Context context = new Context();

        Double result = context.calculate();
        System.out.println("计算结果：" + result);
    }
}
